package com.wjh.www.controller.util;

import java.util.ArrayList;
import java.util.List;

/**
 * 设置放行路径的工具类
 *
 * @author wjh
 * @date 2021/9/12 17:21
 * @Package com.wjh.anyview.controller.util
 */
public class DoFilterUtil {
    /**
     * 可放行接口
     */
    static List<String> DO_FILTER_LIST;
    /**
     * token可持续的最长时间
     */
    public static final Long DURATION_TIME = 7200000L;

    static {
        DO_FILTER_LIST = new ArrayList<>();
        setFilterList();
    }

    /**
     * 设置放行路径
     */
    private static void setFilterList() {
        DO_FILTER_LIST.add("/");
        DO_FILTER_LIST.add("/favicon.ico");
        DO_FILTER_LIST.add("/login");
        DO_FILTER_LIST.add("/Login.jpg");
        DO_FILTER_LIST.add("/addUser");
        DO_FILTER_LIST.add("/Login.html");
        DO_FILTER_LIST.add("/Student.html");
        DO_FILTER_LIST.add("/jquery.js");
        DO_FILTER_LIST.add("/Admin.html");
        DO_FILTER_LIST.add("/listCourseInExcel");
        DO_FILTER_LIST.add("/register");
        DO_FILTER_LIST.add("/Register.html");
        DO_FILTER_LIST.add("/image02.png");
    }

    /**
     * 获取doFilterList
     *
     * @return 返回doFilterList
     */
    public static List<String> getDoFilterList() {
        return DO_FILTER_LIST;
    }
}
